﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

/*
public class ResourceDefs
{
	public static BaseResource<T> LoadWrappedResource<T>(string path)
	{
		BaseResource<T> ret	= null;

		// TODO : 리소스 정의가 추가될 때마다 여기에다가 추가해주기
		switch(typeof(T))
		{
		case typeof(GameObject):
			ret		= new PrefabResource(path);
			break;

		case typeof(Texture2D):
			ret		= new TextureResource(path);
			break;
		}

		return ret;
	}
}
*/


// 리소스 정의

public class TextureResource : BaseResource<Texture2D>
{
	public TextureResource(string path) : base(path) { }

	protected override object LoadResource (string path)
	{
		return Resources.Load (path);
	}

	protected override void UnloadResource (object resRef)
	{
	}
}

public class PrefabResource : BaseResource<GameObject>
{
	public PrefabResource(string path) : base(path) { }

	protected override object LoadResource (string path)
	{
		return Resources.Load(path);
	}

	protected override void UnloadResource (object resRef)
	{
	}
}
